<form id="add-form" class="form-horizontal form-ajax nice-validator n-default n-bootstrap" role="form" data-toggle="validator" method="POST" action="{:url('edit_service')}" novalidate="novalidate">

    <input type="hidden" name="id" value="{$service.id}">
    <div class="form-group">
        <label for="pid" class="control-label col-xs-12 col-sm-2">父级:</label>
        <div class="col-xs-12 col-sm-8">
            <select name="pid" id="pid" class="form-control">
                {if condition="$service.pid eq 0"}
                <option value="0">无</option>
                {else/}
                {foreach name="top_service" item="vo"}
                    <option value="{$vo.id}" {if condition="$service.pid eq $vo.id"}selected{/if}>{$vo.service_name}</option>
                {/foreach}
                {/if}
            </select>
        </div>
    </div>
    
    <div class="form-group">
        <label for="pid" class="control-label col-xs-12 col-sm-2">地域:</label>
        <div class="col-xs-12 col-sm-8">
            <select name="city" id="city" class="form-control">
                {foreach name="citylist" item="vo"}
                    <option value="{$vo.id}">{$vo.areaname}</option>
                {/foreach}
            </select>
        </div>
    </div>

    <div class="form-group">
        <label for="service_name" class="control-label col-xs-12 col-sm-2">服务名称:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="text" name="service_name" id="service_name" value="{$service.service_name}" class="form-control">
        </div>
    </div>

    <div class="form-group">
        <label for="starting_price" class="control-label col-xs-12 col-sm-2">起步价:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="text" name="starting_price" id="starting_price" value="{$service.starting_price}" class="form-control">
        </div>
    </div>

    <div class="form-group">
        <label for="status" class="control-label col-xs-12 col-sm-2">服务状态:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="radio" name="status" id="status" value="1" {if condition="$service.status eq 1"}checked{/if}>正常
            <input type="radio" name="status" id="" value="0" {if condition="$service.status eq 0"}checked{/if}>隐藏
        </div>
    </div>

    <div class="form-group layer-footer">
        <div class="col-xs-2"></div>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed">提交</button>
            <button type="reset" class="btn btn-default btn-embossed">重置</button>
        </div>
    </div>
</form>
